package com.shiyi.test;

import com.shiyi.service.UserService;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class OOMSimulation {

    static class OOMObject {
        private String name;
    }

    public static void main(String[] args) throws InterruptedException, BrokenBarrierException {
//        new UserService();

        AtomicInteger atomicInteger = new AtomicInteger(3);
        int andIncrement = atomicInteger.getAndIncrement();
        int i = atomicInteger.incrementAndGet();
        atomicInteger.decrementAndGet();
        atomicInteger.get();
        atomicInteger.set(1);

    }
}
